#include <iostream>
#include <functional>
#include <thread>

using namespace std;

void func(void)
{
    cout << "hello world" << endl;
}

int main(void)
{
    void (*func_ptr)(void) = func;
    function<void(void)> func_obj = func;

    thread t1(func);
    thread t2(func_ptr);
    thread t3(func_obj);
    thread t4([]
              { cout << "hello world" << endl; });

    t1.join();
    t2.join();
    t3.join();
    t4.join();

    return 0;
}
